\(\int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx\) [140]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 232 \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=-\frac {\left (a^2+b^2\right )^3}{2 a^2 b^5 d (b+a \cot (c+d x))^2}-\frac {\left (5 a^2-b^2\right ) \left (a^2+b^2\right )^2}{a^2 b^6 d (b+a \cot (c+d x))}+\frac {3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (b+a \cot (c+d x))}{b^7 d}+\frac {3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (\tan (c+d x))}{b^7 d}-\frac {a \left (10 a^2+9 b^2\right ) \tan (c+d x)}{b^6 d}+\frac {3 \left (2 a^2+b^2\right ) \tan ^2(c+d x)}{2 b^5 d}-\frac {a \tan ^3(c+d x)}{b^4 d}+\frac {\tan ^4(c+d x)}{4 b^3 d} \]

[Out]

-1/2*(a^2+b^2)^3/a^2/b^5/d/(b+a*cot(d*x+c))^2-(5*a^2-b^2)*(a^2+b^2)^2/a^2/b^6/d/(b+a*cot(d*x+c))+3*(a^2+b^2)*(
5*a^2+b^2)*ln(b+a*cot(d*x+c))/b^7/d+3*(a^2+b^2)*(5*a^2+b^2)*ln(tan(d*x+c))/b^7/d-a*(10*a^2+9*b^2)*tan(d*x+c)/b
^6/d+3/2*(2*a^2+b^2)*tan(d*x+c)^2/b^5/d-a*tan(d*x+c)^3/b^4/d+1/4*tan(d*x+c)^4/b^3/d

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3167, 908} \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\frac {3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (\tan (c+d x))}{b^7 d}+\frac {3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (a \cot (c+d x)+b)}{b^7 d}-\frac {a \left (10 a^2+9 b^2\right ) \tan (c+d x)}{b^6 d}-\frac {\left (5 a^2-b^2\right ) \left (a^2+b^2\right )^2}{a^2 b^6 d (a \cot (c+d x)+b)}+\frac {3 \left (2 a^2+b^2\right ) \tan ^2(c+d x)}{2 b^5 d}-\frac {\left (a^2+b^2\right )^3}{2 a^2 b^5 d (a \cot (c+d x)+b)^2}-\frac {a \tan ^3(c+d x)}{b^4 d}+\frac {\tan ^4(c+d x)}{4 b^3 d} \]

[In]

Int[Sec[c + d*x]^5/(a*Cos[c + d*x] + b*Sin[c + d*x])^3,x]

[Out]

-1/2*(a^2 + b^2)^3/(a^2*b^5*d*(b + a*Cot[c + d*x])^2) - ((5*a^2 - b^2)*(a^2 + b^2)^2)/(a^2*b^6*d*(b + a*Cot[c
+ d*x])) + (3*(a^2 + b^2)*(5*a^2 + b^2)*Log[b + a*Cot[c + d*x]])/(b^7*d) + (3*(a^2 + b^2)*(5*a^2 + b^2)*Log[Ta
n[c + d*x]])/(b^7*d) - (a*(10*a^2 + 9*b^2)*Tan[c + d*x])/(b^6*d) + (3*(2*a^2 + b^2)*Tan[c + d*x]^2)/(2*b^5*d)
- (a*Tan[c + d*x]^3)/(b^4*d) + Tan[c + d*x]^4/(4*b^3*d)

Rule 908

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 3167

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[-d^(-1), Subst[Int[x^m*((b + a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^5 (b+a x)^3} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {1}{b^3 x^5}-\frac {3 a}{b^4 x^4}+\frac {3 \left (2 a^2+b^2\right )}{b^5 x^3}+\frac {-10 a^3-9 a b^2}{b^6 x^2}+\frac {3 \left (5 a^4+6 a^2 b^2+b^4\right )}{b^7 x}-\frac {\left (a^2+b^2\right )^3}{a b^5 (b+a x)^3}-\frac {\left (5 a^2-b^2\right ) \left (a^2+b^2\right )^2}{a b^6 (b+a x)^2}-\frac {3 a \left (5 a^4+6 a^2 b^2+b^4\right )}{b^7 (b+a x)}\right ) \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {\left (a^2+b^2\right )^3}{2 a^2 b^5 d (b+a \cot (c+d x))^2}-\frac {\left (5 a^2-b^2\right ) \left (a^2+b^2\right )^2}{a^2 b^6 d (b+a \cot (c+d x))}+\frac {3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (b+a \cot (c+d x))}{b^7 d}+\frac {3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (\tan (c+d x))}{b^7 d}-\frac {a \left (10 a^2+9 b^2\right ) \tan (c+d x)}{b^6 d}+\frac {3 \left (2 a^2+b^2\right ) \tan ^2(c+d x)}{2 b^5 d}-\frac {a \tan ^3(c+d x)}{b^4 d}+\frac {\tan ^4(c+d x)}{4 b^3 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.43 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.17 \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\frac {2 \left (a^2+b^2\right ) \left (19 a^4+16 a^2 b^2-3 b^4+6 a^2 \left (5 a^2+b^2\right ) \log (a+b \tan (c+d x))\right )+b^6 \sec ^6(c+d x)+4 a b \left (4 a^4+17 a^2 b^2+11 b^4+6 \left (5 a^4+6 a^2 b^2+b^4\right ) \log (a+b \tan (c+d x))\right ) \tan (c+d x)+4 b^2 \left (-13 a^4-10 a^2 b^2+3 \left (5 a^4+6 a^2 b^2+b^4\right ) \log (a+b \tan (c+d x))\right ) \tan ^2(c+d x)-20 a b^3 \left (a^2+b^2\right ) \tan ^3(c+d x)+4 a^2 b^4 \tan ^4(c+d x)+b^4 \sec ^4(c+d x) \left (a^2+3 b^2-2 a b \tan (c+d x)\right )}{4 b^7 d (a+b \tan (c+d x))^2} \]

[In]

Integrate[Sec[c + d*x]^5/(a*Cos[c + d*x] + b*Sin[c + d*x])^3,x]

[Out]

(2*(a^2 + b^2)*(19*a^4 + 16*a^2*b^2 - 3*b^4 + 6*a^2*(5*a^2 + b^2)*Log[a + b*Tan[c + d*x]]) + b^6*Sec[c + d*x]^
6 + 4*a*b*(4*a^4 + 17*a^2*b^2 + 11*b^4 + 6*(5*a^4 + 6*a^2*b^2 + b^4)*Log[a + b*Tan[c + d*x]])*Tan[c + d*x] + 4
*b^2*(-13*a^4 - 10*a^2*b^2 + 3*(5*a^4 + 6*a^2*b^2 + b^4)*Log[a + b*Tan[c + d*x]])*Tan[c + d*x]^2 - 20*a*b^3*(a
^2 + b^2)*Tan[c + d*x]^3 + 4*a^2*b^4*Tan[c + d*x]^4 + b^4*Sec[c + d*x]^4*(a^2 + 3*b^2 - 2*a*b*Tan[c + d*x]))/(
4*b^7*d*(a + b*Tan[c + d*x])^2)

Maple [A] (verified)

Time = 3.79 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.84

method result size
derivativedivides \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{4} b^{3}}{4}+a \tan \left (d x +c \right )^{3} b^{2}-3 a^{2} b \tan \left (d x +c \right )^{2}-\frac {3 b^{3} \tan \left (d x +c \right )^{2}}{2}+10 \tan \left (d x +c \right ) a^{3}+9 \tan \left (d x +c \right ) a \,b^{2}}{b^{6}}+\frac {\left (15 a^{4}+18 a^{2} b^{2}+3 b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{7}}-\frac {a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}{2 b^{7} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {6 a \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}{b^{7} \left (a +b \tan \left (d x +c \right )\right )}}{d}\) \(195\)
default \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{4} b^{3}}{4}+a \tan \left (d x +c \right )^{3} b^{2}-3 a^{2} b \tan \left (d x +c \right )^{2}-\frac {3 b^{3} \tan \left (d x +c \right )^{2}}{2}+10 \tan \left (d x +c \right ) a^{3}+9 \tan \left (d x +c \right ) a \,b^{2}}{b^{6}}+\frac {\left (15 a^{4}+18 a^{2} b^{2}+3 b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{7}}-\frac {a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}{2 b^{7} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {6 a \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}{b^{7} \left (a +b \tan \left (d x +c \right )\right )}}{d}\) \(195\)
norman \(\frac {\frac {\left (360 a^{6}+452 a^{4} b^{2}+96 a^{2} b^{4}-8 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{a^{2} d \,b^{5}}+\frac {\left (360 a^{6}+452 a^{4} b^{2}+96 a^{2} b^{4}-8 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{a^{2} d \,b^{5}}-\frac {2 \left (45 a^{6}+54 a^{4} b^{2}+9 a^{2} b^{4}-b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a^{2} d \,b^{5}}-\frac {2 \left (45 a^{6}+54 a^{4} b^{2}+9 a^{2} b^{4}-b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{a^{2} d \,b^{5}}-\frac {4 \left (75 a^{6}+60 a^{4} b^{2}-17 a^{2} b^{4}-5 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{a d \,b^{6}}+\frac {4 \left (75 a^{6}+60 a^{4} b^{2}-17 a^{2} b^{4}-5 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d \,b^{6}}+\frac {2 \left (75 a^{6}+70 a^{4} b^{2}-9 a^{2} b^{4}-5 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d \,b^{6}}-\frac {2 \left (75 a^{6}+70 a^{4} b^{2}-9 a^{2} b^{4}-5 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{a d \,b^{6}}-\frac {4 \left (135 a^{6}+172 a^{4} b^{2}+35 a^{2} b^{4}-3 b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{b^{5} d \,a^{2}}-\frac {2 \left (15 a^{6}+18 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a \,b^{6} d}+\frac {2 \left (15 a^{6}+18 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{a \,b^{6} d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )^{2}}-\frac {3 \left (5 a^{4}+6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{7} d}-\frac {3 \left (5 a^{4}+6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{7} d}+\frac {3 \left (5 a^{4}+6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{b^{7} d}\) \(714\)
risch \(\frac {-60 a^{4} b -52 a^{2} b^{3}+12 b^{5} {\mathrm e}^{4 i \left (d x +c \right )}+320 i a^{3} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-58 i a \,b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+36 i a^{3} b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+6 i a \,b^{4} {\mathrm e}^{10 i \left (d x +c \right )}+180 i a^{3} b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+30 i a \,b^{4} {\mathrm e}^{8 i \left (d x +c \right )}+240 i a^{3} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-4 i a \,b^{4} {\mathrm e}^{4 i \left (d x +c \right )}+60 i a^{3} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+52 i a \,b^{4} {\mathrm e}^{6 i \left (d x +c \right )}+6 b^{5} {\mathrm e}^{10 i \left (d x +c \right )}-4 b^{5} {\mathrm e}^{6 i \left (d x +c \right )}+30 i a^{5}+12 b^{5} {\mathrm e}^{8 i \left (d x +c \right )}+6 b^{5} {\mathrm e}^{2 i \left (d x +c \right )}+30 i a^{5} {\mathrm e}^{10 i \left (d x +c \right )}+150 i a^{5} {\mathrm e}^{8 i \left (d x +c \right )}+300 i a^{5} {\mathrm e}^{6 i \left (d x +c \right )}+300 i a^{5} {\mathrm e}^{4 i \left (d x +c \right )}+150 i a^{5} {\mathrm e}^{2 i \left (d x +c \right )}-4 i a^{3} b^{2}-26 i a \,b^{4}-32 a^{2} b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+72 a^{2} b^{3} {\mathrm e}^{8 i \left (d x +c \right )}-60 a^{4} b \,{\mathrm e}^{6 i \left (d x +c \right )}+60 a^{4} b \,{\mathrm e}^{8 i \left (d x +c \right )}+30 a^{4} b \,{\mathrm e}^{10 i \left (d x +c \right )}-172 a^{2} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-188 a^{2} b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-210 a^{4} b \,{\mathrm e}^{2 i \left (d x +c \right )}-240 a^{4} b \,{\mathrm e}^{4 i \left (d x +c \right )}+36 a^{2} b^{3} {\mathrm e}^{10 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right )^{2} b^{6} d}+\frac {15 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{4}}{b^{7} d}+\frac {18 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{2}}{b^{5} d}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{3} d}-\frac {15 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{4}}{b^{7} d}-\frac {18 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{5} d}-\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{3} d}\) \(752\)
parallelrisch \(\frac {900 \left (a^{2}+\frac {b^{2}}{5}\right ) \left (\left (a^{2}+\frac {b^{2}}{15}\right ) \cos \left (2 d x +2 c \right )+\frac {2 \left (a^{2}-\frac {b^{2}}{3}\right ) \cos \left (4 d x +4 c \right )}{5}+\frac {\left (a^{2}-b^{2}\right ) \cos \left (6 d x +6 c \right )}{15}+\frac {8 a b \sin \left (4 d x +4 c \right )}{15}+\frac {2 a b \sin \left (6 d x +6 c \right )}{15}+\frac {2 a b \sin \left (2 d x +2 c \right )}{3}+\frac {2 a^{2}}{3}+\frac {2 b^{2}}{15}\right ) \left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )-900 \left (a^{2}+\frac {b^{2}}{5}\right ) \left (\left (a^{2}+\frac {b^{2}}{15}\right ) \cos \left (2 d x +2 c \right )+\frac {2 \left (a^{2}-\frac {b^{2}}{3}\right ) \cos \left (4 d x +4 c \right )}{5}+\frac {\left (a^{2}-b^{2}\right ) \cos \left (6 d x +6 c \right )}{15}+\frac {8 a b \sin \left (4 d x +4 c \right )}{15}+\frac {2 a b \sin \left (6 d x +6 c \right )}{15}+\frac {2 a b \sin \left (2 d x +2 c \right )}{3}+\frac {2 a^{2}}{3}+\frac {2 b^{2}}{15}\right ) \left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-900 \left (a^{2}+\frac {b^{2}}{5}\right ) \left (\left (a^{2}+\frac {b^{2}}{15}\right ) \cos \left (2 d x +2 c \right )+\frac {2 \left (a^{2}-\frac {b^{2}}{3}\right ) \cos \left (4 d x +4 c \right )}{5}+\frac {\left (a^{2}-b^{2}\right ) \cos \left (6 d x +6 c \right )}{15}+\frac {8 a b \sin \left (4 d x +4 c \right )}{15}+\frac {2 a b \sin \left (6 d x +6 c \right )}{15}+\frac {2 a b \sin \left (2 d x +2 c \right )}{3}+\frac {2 a^{2}}{3}+\frac {2 b^{2}}{15}\right ) \left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (450 a^{6}+480 a^{4} b^{2}+13 a^{2} b^{4}-63 b^{6}\right ) \cos \left (2 d x +2 c \right )+2 \left (90 a^{6}+168 a^{4} b^{2}+85 a^{2} b^{4}+3 b^{6}\right ) \cos \left (4 d x +4 c \right )+\left (30 a^{6}+96 a^{4} b^{2}+83 a^{2} b^{4}+15 b^{6}\right ) \cos \left (6 d x +6 c \right )+2 \left (-30 a^{3} b^{3}-41 a \,b^{5}\right ) \sin \left (2 d x +2 c \right )+2 \left (10 a^{3} b^{3}+11 a \,b^{5}\right ) \sin \left (6 d x +6 c \right )+8 a \,b^{5} \sin \left (4 d x +4 c \right )+300 a^{6}+240 a^{4} b^{2}-74 a^{2} b^{4}-22 b^{6}}{4 d \left (\left (15 a^{2} b^{7}+b^{9}\right ) \cos \left (2 d x +2 c \right )+b^{7} \left (6 a^{2} \cos \left (4 d x +4 c \right )+a^{2} \cos \left (6 d x +6 c \right )+8 a b \sin \left (4 d x +4 c \right )+2 a b \sin \left (6 d x +6 c \right )+10 a b \sin \left (2 d x +2 c \right )-2 b^{2} \cos \left (4 d x +4 c \right )-b^{2} \cos \left (6 d x +6 c \right )+10 a^{2}+2 b^{2}\right )\right )}\) \(781\)

[In]

int(sec(d*x+c)^5/(cos(d*x+c)*a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/b^6*(-1/4*tan(d*x+c)^4*b^3+a*tan(d*x+c)^3*b^2-3*a^2*b*tan(d*x+c)^2-3/2*b^3*tan(d*x+c)^2+10*tan(d*x+c)*
a^3+9*tan(d*x+c)*a*b^2)+(15*a^4+18*a^2*b^2+3*b^4)/b^7*ln(a+b*tan(d*x+c))-1/2/b^7*(a^6+3*a^4*b^2+3*a^2*b^4+b^6)
/(a+b*tan(d*x+c))^2+6*a/b^7*(a^4+2*a^2*b^2+b^4)/(a+b*tan(d*x+c)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 476 vs. \(2 (226) = 452\).

Time = 0.30 (sec) , antiderivative size = 476, normalized size of antiderivative = 2.05 \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\frac {8 \, {\left (15 \, a^{4} b^{2} + 13 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} + b^{6} - 2 \, {\left (45 \, a^{4} b^{2} + 44 \, a^{2} b^{4} + 3 \, b^{6}\right )} \cos \left (d x + c\right )^{4} + {\left (5 \, a^{2} b^{4} + 3 \, b^{6}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left ({\left (5 \, a^{6} + a^{4} b^{2} - 5 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )^{6} + 2 \, {\left (5 \, a^{5} b + 6 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + {\left (5 \, a^{4} b^{2} + 6 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \, {\left ({\left (5 \, a^{6} + a^{4} b^{2} - 5 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )^{6} + 2 \, {\left (5 \, a^{5} b + 6 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + {\left (5 \, a^{4} b^{2} + 6 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \, {\left (a b^{5} \cos \left (d x + c\right ) + 2 \, {\left (15 \, a^{5} b - 2 \, a^{3} b^{3} - 13 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} + 10 \, {\left (a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{4 \, {\left (2 \, a b^{8} d \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + b^{9} d \cos \left (d x + c\right )^{4} + {\left (a^{2} b^{7} - b^{9}\right )} d \cos \left (d x + c\right )^{6}\right )}} \]

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/4*(8*(15*a^4*b^2 + 13*a^2*b^4)*cos(d*x + c)^6 + b^6 - 2*(45*a^4*b^2 + 44*a^2*b^4 + 3*b^6)*cos(d*x + c)^4 + (
5*a^2*b^4 + 3*b^6)*cos(d*x + c)^2 + 6*((5*a^6 + a^4*b^2 - 5*a^2*b^4 - b^6)*cos(d*x + c)^6 + 2*(5*a^5*b + 6*a^3
*b^3 + a*b^5)*cos(d*x + c)^5*sin(d*x + c) + (5*a^4*b^2 + 6*a^2*b^4 + b^6)*cos(d*x + c)^4)*log(2*a*b*cos(d*x +
c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - 6*((5*a^6 + a^4*b^2 - 5*a^2*b^4 - b^6)*cos(d*x + c)^6 +
2*(5*a^5*b + 6*a^3*b^3 + a*b^5)*cos(d*x + c)^5*sin(d*x + c) + (5*a^4*b^2 + 6*a^2*b^4 + b^6)*cos(d*x + c)^4)*lo
g(cos(d*x + c)^2) - 2*(a*b^5*cos(d*x + c) + 2*(15*a^5*b - 2*a^3*b^3 - 13*a*b^5)*cos(d*x + c)^5 + 10*(a^3*b^3 +
 a*b^5)*cos(d*x + c)^3)*sin(d*x + c))/(2*a*b^8*d*cos(d*x + c)^5*sin(d*x + c) + b^9*d*cos(d*x + c)^4 + (a^2*b^7
 - b^9)*d*cos(d*x + c)^6)

Sympy [F]

\[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\int \frac {\sec ^{5}{\left (c + d x \right )}}{\left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{3}}\, dx \]

[In]

integrate(sec(d*x+c)**5/(a*cos(d*x+c)+b*sin(d*x+c))**3,x)

[Out]

Integral(sec(c + d*x)**5/(a*cos(c + d*x) + b*sin(c + d*x))**3, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1053 vs. \(2 (226) = 452\).

Time = 0.27 (sec) , antiderivative size = 1053, normalized size of antiderivative = 4.54 \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\text {Too large to display} \]

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-(2*((15*a^7 + 18*a^5*b^2 + 3*a^3*b^4 - a*b^6)*sin(d*x + c)/(cos(d*x + c) + 1) + (45*a^6*b + 54*a^4*b^3 + 9*a^
2*b^5 - b^7)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - (75*a^7 + 70*a^5*b^2 - 9*a^3*b^4 - 5*a*b^6)*sin(d*x + c)^3/
(cos(d*x + c) + 1)^3 - 2*(90*a^6*b + 113*a^4*b^3 + 24*a^2*b^5 - 2*b^7)*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 2
*(75*a^7 + 60*a^5*b^2 - 17*a^3*b^4 - 5*a*b^6)*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 2*(135*a^6*b + 172*a^4*b^3
 + 35*a^2*b^5 - 3*b^7)*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 2*(75*a^7 + 60*a^5*b^2 - 17*a^3*b^4 - 5*a*b^6)*si
n(d*x + c)^7/(cos(d*x + c) + 1)^7 - 2*(90*a^6*b + 113*a^4*b^3 + 24*a^2*b^5 - 2*b^7)*sin(d*x + c)^8/(cos(d*x +
c) + 1)^8 + (75*a^7 + 70*a^5*b^2 - 9*a^3*b^4 - 5*a*b^6)*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 + (45*a^6*b + 54*a
^4*b^3 + 9*a^2*b^5 - b^7)*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 - (15*a^7 + 18*a^5*b^2 + 3*a^3*b^4 - a*b^6)*si
n(d*x + c)^11/(cos(d*x + c) + 1)^11)/(a^4*b^6 + 4*a^3*b^7*sin(d*x + c)/(cos(d*x + c) + 1) - 20*a^3*b^7*sin(d*x
 + c)^3/(cos(d*x + c) + 1)^3 + 40*a^3*b^7*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 40*a^3*b^7*sin(d*x + c)^7/(cos
(d*x + c) + 1)^7 + 20*a^3*b^7*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - 4*a^3*b^7*sin(d*x + c)^11/(cos(d*x + c) +
1)^11 + a^4*b^6*sin(d*x + c)^12/(cos(d*x + c) + 1)^12 - 2*(3*a^4*b^6 - 2*a^2*b^8)*sin(d*x + c)^2/(cos(d*x + c)
 + 1)^2 + (15*a^4*b^6 - 16*a^2*b^8)*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 4*(5*a^4*b^6 - 6*a^2*b^8)*sin(d*x +
c)^6/(cos(d*x + c) + 1)^6 + (15*a^4*b^6 - 16*a^2*b^8)*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 2*(3*a^4*b^6 - 2*a
^2*b^8)*sin(d*x + c)^10/(cos(d*x + c) + 1)^10) - 3*(5*a^4 + 6*a^2*b^2 + b^4)*log(-a - 2*b*sin(d*x + c)/(cos(d*
x + c) + 1) + a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)/b^7 + 3*(5*a^4 + 6*a^2*b^2 + b^4)*log(sin(d*x + c)/(cos(d
*x + c) + 1) + 1)/b^7 + 3*(5*a^4 + 6*a^2*b^2 + b^4)*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/b^7)/d

Giac [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.05 \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\frac {\frac {12 \, {\left (5 \, a^{4} + 6 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{7}} - \frac {2 \, {\left (45 \, a^{4} b^{2} \tan \left (d x + c\right )^{2} + 54 \, a^{2} b^{4} \tan \left (d x + c\right )^{2} + 9 \, b^{6} \tan \left (d x + c\right )^{2} + 78 \, a^{5} b \tan \left (d x + c\right ) + 84 \, a^{3} b^{3} \tan \left (d x + c\right ) + 6 \, a b^{5} \tan \left (d x + c\right ) + 34 \, a^{6} + 33 \, a^{4} b^{2} + b^{6}\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{2} b^{7}} + \frac {b^{9} \tan \left (d x + c\right )^{4} - 4 \, a b^{8} \tan \left (d x + c\right )^{3} + 12 \, a^{2} b^{7} \tan \left (d x + c\right )^{2} + 6 \, b^{9} \tan \left (d x + c\right )^{2} - 40 \, a^{3} b^{6} \tan \left (d x + c\right ) - 36 \, a b^{8} \tan \left (d x + c\right )}{b^{12}}}{4 \, d} \]

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/4*(12*(5*a^4 + 6*a^2*b^2 + b^4)*log(abs(b*tan(d*x + c) + a))/b^7 - 2*(45*a^4*b^2*tan(d*x + c)^2 + 54*a^2*b^4
*tan(d*x + c)^2 + 9*b^6*tan(d*x + c)^2 + 78*a^5*b*tan(d*x + c) + 84*a^3*b^3*tan(d*x + c) + 6*a*b^5*tan(d*x + c
) + 34*a^6 + 33*a^4*b^2 + b^6)/((b*tan(d*x + c) + a)^2*b^7) + (b^9*tan(d*x + c)^4 - 4*a*b^8*tan(d*x + c)^3 + 1
2*a^2*b^7*tan(d*x + c)^2 + 6*b^9*tan(d*x + c)^2 - 40*a^3*b^6*tan(d*x + c) - 36*a*b^8*tan(d*x + c))/b^12)/d

Mupad [B] (verification not implemented)

Time = 30.62 (sec) , antiderivative size = 1712, normalized size of antiderivative = 7.38 \[ \int \frac {\sec ^5(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx=\text {Too large to display} \]

[In]

int(1/(cos(c + d*x)^5*(a*cos(c + d*x) + b*sin(c + d*x))^3),x)

[Out]

- ((2*tan(c/2 + (d*x)/2)*(15*a^6 - b^6 + 3*a^2*b^4 + 18*a^4*b^2))/(a*b^6) - (2*tan(c/2 + (d*x)/2)^11*(15*a^6 -
 b^6 + 3*a^2*b^4 + 18*a^4*b^2))/(a*b^6) + (2*tan(c/2 + (d*x)/2)^2*(45*a^6 - b^6 + 9*a^2*b^4 + 54*a^4*b^2))/(a^
2*b^5) + (2*tan(c/2 + (d*x)/2)^10*(45*a^6 - b^6 + 9*a^2*b^4 + 54*a^4*b^2))/(a^2*b^5) - (2*tan(c/2 + (d*x)/2)^3
*(75*a^6 - 5*b^6 - 9*a^2*b^4 + 70*a^4*b^2))/(a*b^6) + (4*tan(c/2 + (d*x)/2)^5*(75*a^6 - 5*b^6 - 17*a^2*b^4 + 6
0*a^4*b^2))/(a*b^6) - (4*tan(c/2 + (d*x)/2)^7*(75*a^6 - 5*b^6 - 17*a^2*b^4 + 60*a^4*b^2))/(a*b^6) + (2*tan(c/2
 + (d*x)/2)^9*(75*a^6 - 5*b^6 - 9*a^2*b^4 + 70*a^4*b^2))/(a*b^6) - (4*tan(c/2 + (d*x)/2)^4*(90*a^6 - 2*b^6 + 2
4*a^2*b^4 + 113*a^4*b^2))/(a^2*b^5) - (4*tan(c/2 + (d*x)/2)^8*(90*a^6 - 2*b^6 + 24*a^2*b^4 + 113*a^4*b^2))/(a^
2*b^5) + (4*tan(c/2 + (d*x)/2)^6*(135*a^6 - 3*b^6 + 35*a^2*b^4 + 172*a^4*b^2))/(a^2*b^5))/(d*(tan(c/2 + (d*x)/
2)^4*(15*a^2 - 16*b^2) - tan(c/2 + (d*x)/2)^10*(6*a^2 - 4*b^2) - tan(c/2 + (d*x)/2)^2*(6*a^2 - 4*b^2) + tan(c/
2 + (d*x)/2)^8*(15*a^2 - 16*b^2) - tan(c/2 + (d*x)/2)^6*(20*a^2 - 24*b^2) + a^2*tan(c/2 + (d*x)/2)^12 + a^2 -
20*a*b*tan(c/2 + (d*x)/2)^3 + 40*a*b*tan(c/2 + (d*x)/2)^5 - 40*a*b*tan(c/2 + (d*x)/2)^7 + 20*a*b*tan(c/2 + (d*
x)/2)^9 - 4*a*b*tan(c/2 + (d*x)/2)^11 + 4*a*b*tan(c/2 + (d*x)/2))) - (atan((((5*a^2 + b^2)*(a^2 + b^2)*((16*ta
n(c/2 + (d*x)/2)*(15*a^6 + 3*a^2*b^4 + 18*a^4*b^2))/b^6 - (4*(6*a*b^11 + 36*a^3*b^9 + 30*a^5*b^7))/b^12 + (4*t
an(c/2 + (d*x)/2)^2*(6*a*b^11 + 36*a^3*b^9 + 30*a^5*b^7))/b^12 + (3*(5*a^2 + b^2)*(a^2 + b^2)*((4*(a*b^14 + 4*
a^3*b^12))/b^12 - (4*tan(c/2 + (d*x)/2)^2*(3*a*b^14 + 4*a^3*b^12))/b^12 + 16*a^2*b*tan(c/2 + (d*x)/2)))/b^7)*3
i)/b^7 - ((5*a^2 + b^2)*(a^2 + b^2)*((4*(6*a*b^11 + 36*a^3*b^9 + 30*a^5*b^7))/b^12 - (16*tan(c/2 + (d*x)/2)*(1
5*a^6 + 3*a^2*b^4 + 18*a^4*b^2))/b^6 - (4*tan(c/2 + (d*x)/2)^2*(6*a*b^11 + 36*a^3*b^9 + 30*a^5*b^7))/b^12 + (3
*(5*a^2 + b^2)*(a^2 + b^2)*((4*(a*b^14 + 4*a^3*b^12))/b^12 - (4*tan(c/2 + (d*x)/2)^2*(3*a*b^14 + 4*a^3*b^12))/
b^12 + 16*a^2*b*tan(c/2 + (d*x)/2)))/b^7)*3i)/b^7)/((8*(9*a*b^8 + 225*a^9 + 108*a^3*b^6 + 414*a^5*b^4 + 540*a^
7*b^2))/b^12 + (8*tan(c/2 + (d*x)/2)^2*(9*a*b^8 + 225*a^9 + 108*a^3*b^6 + 414*a^5*b^4 + 540*a^7*b^2))/b^12 + (
3*(5*a^2 + b^2)*(a^2 + b^2)*((16*tan(c/2 + (d*x)/2)*(15*a^6 + 3*a^2*b^4 + 18*a^4*b^2))/b^6 - (4*(6*a*b^11 + 36
*a^3*b^9 + 30*a^5*b^7))/b^12 + (4*tan(c/2 + (d*x)/2)^2*(6*a*b^11 + 36*a^3*b^9 + 30*a^5*b^7))/b^12 + (3*(5*a^2
+ b^2)*(a^2 + b^2)*((4*(a*b^14 + 4*a^3*b^12))/b^12 - (4*tan(c/2 + (d*x)/2)^2*(3*a*b^14 + 4*a^3*b^12))/b^12 + 1
6*a^2*b*tan(c/2 + (d*x)/2)))/b^7))/b^7 + (3*(5*a^2 + b^2)*(a^2 + b^2)*((4*(6*a*b^11 + 36*a^3*b^9 + 30*a^5*b^7)
)/b^12 - (16*tan(c/2 + (d*x)/2)*(15*a^6 + 3*a^2*b^4 + 18*a^4*b^2))/b^6 - (4*tan(c/2 + (d*x)/2)^2*(6*a*b^11 + 3
6*a^3*b^9 + 30*a^5*b^7))/b^12 + (3*(5*a^2 + b^2)*(a^2 + b^2)*((4*(a*b^14 + 4*a^3*b^12))/b^12 - (4*tan(c/2 + (d
*x)/2)^2*(3*a*b^14 + 4*a^3*b^12))/b^12 + 16*a^2*b*tan(c/2 + (d*x)/2)))/b^7))/b^7))*(5*a^2 + b^2)*(a^2 + b^2)*6
i)/(b^7*d)